import React,{Component} from 'react'; 

class Home2 extends Component { 
    constructor() {
        super(); 
        //react定义数据  
        this.state = {
            name: "张三",
            userInfo: {
                userName: 'joe'
            }
        }
    }

    render() {
        return (
            <div> 
                <h2>React组件里面的所有节点要被更节点包含</h2> 
                <p>我是一个P标签， 你好{this.state.name}</p>
                <p>对象：{this.state.userInfo.userName}</p>
            </div>
        )
    }
}

export default Home2 